<template>
    <div>
        <hd-tab :tabs="tabs"/>
        <el-card class="box-card" shadow="never">
            <div slot="header" class="clearfix">
                <span>审批会员</span>
            </div>
            <el-table
                :data=users
                border
                size="mini"
                style="width: 100%">
                <el-table-column
                    label="ID"
                    prop="id"
                    width="80">
                </el-table-column>

                <el-table-column
                    label="名称"
                    prop="name"
                >
                </el-table-column>

                <el-table-column
                    label="联盟会员"
                    prop="member"
                >

                </el-table-column>
                <el-table-column
                    label="卡券金额"
                    prop="voucher_sum"
                >

                </el-table-column>

                <el-table-column
                    label="介绍"
                    prop="introduce"
                >

                </el-table-column>

                <el-table-column
                    label="手机号"
                    prop="mobile"
                >
                </el-table-column>

                <el-table-column
                    #default="{row:user}"
                    label="操作"
                    width="200">
                    <el-button-group>
                        <el-button size="mini" type="primary" @click="approve(user)">审批</el-button>
                    </el-button-group>
                </el-table-column>
            </el-table>

        </el-card>
    </div>
</template>

<script>
import tabs from './tabs.js'

export default {
    route: {name: 'admin.user.approve', meta: {title: '会员审批'}},
    data() {
        return {
            users: [],
            tabs
        }
    },
    async created() {
        this.users = await this.axios.get('user/getApprove')
    },
    methods: {
        approve(user) {
            this.$router.push({name: 'admin.user.judgment', params: {id: user.id}});
        }
    }
}
</script>

<style scoped>

</style>
